<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>分页测试</title>
</head>
<body>
<h2 align="center">欢迎您~<%=session.getAttribute("username") %></h2>
<h2 align="center">用户表</h2>
<table align="center" border="1">
	<tr>
		<td colspan="7">
		<a href="Login?method=index" style="text-align: left">返回</a>
		
		<a href="listUser?status=addjsp" style="text-align: right;">添加用户</a>
		</td>
	</tr>
	<tr align="center">
		<th>角色</th>
		<th>用户ID</th>
		<th>用户名</th>
		<th>用户余额</th>
		<th colspan="3" align="center">操作</th>
	</tr>
	<c:forEach items="${users}" var="User" varStatus="st">
		<tr>
			<td>${User.role.rName}</td>
			<td>${User.uid}</td>
			<td>${User.uname}</td>
			<td>${User.balance}</td>
			<td><a href="listUser?status=delect&&uid=${User.uid}">删除</a></td>
			<td><a href="listUser?status=userinfo&&uid=${User.uid}">修改</a></td>
			<td><a href="listUser?status=setrole&&uid=${User.uid}">管理员设置</a></td>
		</tr>	
	</c:forEach>
	<tr><td colspan="7" align="center"><a href="listUser?status=selectpage&start=0">首页</a>&emsp;
						<a href="listUser?status=selectpage&start=${prePage}">前一页</a>&emsp;
						<a href="listUser?status=selectpage&start=${nextPage}">后一页</a>&emsp;
						<a href="listUser?status=selectpage&start=${totalPage}">尾页</a>&emsp;
						</td></tr>
	<tr><td colspan="7">总记录数: <%=session.getAttribute("size") %></td></tr>
</table>
</body>
</html>